package com.hd123.rumba.user;

import java.util.List;

import net.sf.hibernate.HibernateException;

import com.hd123.rumba.domain.IDomain;
import com.hd123.rumba.exception.BusinessException;
import com.hd123.rumba.sql.ResultPage;

public interface IDepartmentMgr {

  public IDepartment createDepartment(IDomain domain, String code, String name)
      throws HibernateException, BusinessException;

  public IDepartment getDepartment(String uuid) throws HibernateException;

  public IDepartment getDepartmentByCode(IDomain domain, String code)
      throws HibernateException, BusinessException;

  public void saveDepartment(IDepartment dept) throws HibernateException, BusinessException;

  public void removeDepartment(IDepartment dept) throws HibernateException,
      BusinessException;

  public List createAllDepartmentsList(IDomain domain) throws HibernateException,
      BusinessException;

  public ResultPage createAllDepartmentsPage(IDomain domain, int pageSize, int page)
      throws Exception, BusinessException;

  public List createUsersList(IDepartment dept) throws HibernateException,
      BusinessException;

  public void assignUserToDepartment(IUser user, IDepartment dept)
      throws HibernateException, BusinessException;

  public void removeUserFromDepartment(IUser user, IDepartment dept)
      throws HibernateException, BusinessException;

}
